package cn.edu.sgu.www.mhxysy.entity.achievement;

import cn.edu.sgu.www.mhxysy.consts.IdentifierPrefixes;
import cn.edu.sgu.www.mhxysy.util.StringUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 角色称谓
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
@TableName("role_chengwei")
public class RoleChengwei implements Serializable {
	private static final long serialVersionUID = 18L;

	@TableId(value = "id", type = IdType.INPUT)
	@ApiModelProperty(value = "ID")
	private String id;

	/**
	 * 使用状态
	 * 0-未使用；1-使用中
	 */
	@ApiModelProperty(value = "使用状态")
	private Integer useStatus;

	/**
	 * 角色ID
	 */
	@ApiModelProperty(value = "角色ID")
	private String roleId;

	/**
	 * 称谓ID
	 */
	@ApiModelProperty(value = "称谓ID")
	private Integer chengweiId;

	/**
	 * 装饰过期时间
	 */
	@ApiModelProperty(value = "装饰过期时间")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private LocalDate endTime;

	public String uuid() {
		return IdentifierPrefixes.PREFIX_JSCW + StringUtils.uuid();
	}

}